package com.suray.wcs.service.system.bo;

import com.suray.basic.wcs.utils.Coord;

import java.util.List;
import java.util.stream.Collectors;

public class ResourcesNodeBO extends Coord {
    private String lockBy;
    private String lockNo;
    private String showType = ShowTypeEnum.NODE.name();
    private long unLockTime;
    private List<Integer> routeBy;
    private String routeByStr;
    private int lockTime;
    private String routeDirection;

    public ResourcesNodeBO(int x, int y, int z) {
        super(x, y, z);
    }

    public enum ShowTypeEnum {
        NODE,
        RGV,
        TASK_DB,
    }


    public String getLockBy() {
        return lockBy;
    }

    public void setLockBy(String lockBy) {
        this.lockBy = lockBy;
    }

    public String getLockNo() {
        return lockNo;
    }

    public void setLockNo(String lockNo) {
        this.lockNo = lockNo;
    }

    public String getShowType() {
        return showType;
    }

    public void setShowType(String showType) {
        this.showType = showType;
    }

    public long getUnLockTime() {
        return unLockTime;
    }

    public void setUnLockTime(long unLockTime) {
        this.unLockTime = unLockTime;
    }

    public List<Integer> getRouteBy() {
        return routeBy;
    }

    public void setRouteBy(List<Integer> routeBy) {
        this.routeBy = routeBy;
        if(routeBy != null) {
            this.routeByStr = routeBy.stream().map(x -> x.toString()).collect(Collectors.joining(","));
        }
    }

    public String getRouteByStr() {
        return routeByStr;
    }

    public int getLockTime() {
        return lockTime;
    }

    public void setLockTime(int lockTime) {
        this.lockTime = lockTime;
    }


    public String  getRouteDirection() {
        return routeDirection;
    }

    public void setRouteDirection(String  routeDirection) {
        this.routeDirection = routeDirection;
    }
}
